package test.day03;

import java.util.Scanner;

public class test04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();//原值输入
        int temp = a;//中间存储
        int num = 0;//新值

        while (a != 0) {
            int ge = a % 10;//取出个位
            a = a / 10;//往前移动位置，分别取出十位百位千位……
            num = num * 10 + ge;//将数字倒过来
        }
        System.out.println(num);
        System.out.println(num == temp);

    }
}
